package net.sppan.base.service;

import net.sppan.base.entity.mgEntity.MgCode;
import net.sppan.base.service.support.IBaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

/**
 * <p>
 * 用户服务类
 * </p>
 *
 * @author SPPan
 * @since 2016-12-28
 */
public interface IMgCodeService extends IBaseService<MgCode, Integer> {


	MgCode findByCode(String code);

	MgCode findByCodeStatusAndCodeType(String codeStatus, String codeType);

	/**
	 * 增加或者修改用户
	 * @param user
	 */
	void saveOrUpdate(MgCode user);


	/**
	 * 根据关键字获取分页
	 * @param searchText
	 * @param pageRequest
	 * @return
	 */
	Page<MgCode> findAllByLike(String searchText, PageRequest pageRequest);
}
